<%--
  Created by IntelliJ IDEA.
  User: 12460
  Date: 2024/12/1
  Time: 11:03
  To change this template use File | Settings | File Templates.
--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%-- isELIgnored="false"关闭忽略El--%>
<html>
<head>
    <title>用户列表</title>
    <style type="text/css">
        td,th{
            text-align: center;
        }
    </style>
</head>
<body>
    <h2 style="color: red;text-align: center">欢迎您:&nbsp;${loginUser.username}</h2>
    <h3 style="text-align: center">用户列表</h3>

    <table border="1" align="center" width="500" height="200">
        <tr style="background-color: pink">
            <th>ID</th>
            <th>用户名</th>
            <th>密码</th>
            <th>性别</th>
            <th>年龄</th>
            <th>地址</th>
            <th colspan="2">操作</th>
        </tr>
        <c:forEach items="${userList}" var="user">
            <tr>
                <td>${user.id}</td>
                <td>${user.username}</td>
                <td>${user.password}</td>
                <td>${user.gender}</td>
                <td>${user.age}</td>
                <td>${user.address}</td>
                <%-- http://localhost:8080/findUserById?id=--%>
                <td><a href="findUserById?id=${user.id}">修改</a></td>
                <td><a href="deleleById?id=${user.id}">删除</a></td>
            </tr>
        </c:forEach>
        <tr>
            <td align="center" colspan="6">
                <a href="add.jsp">新增用户</a>
            </td>
        </tr>
    </table>
</body>
</html>
